package com.fenghuajueli.libbasecoreui.dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.Gravity;
import android.view.WindowManager;

import androidx.annotation.NonNull;

import com.fenghuajueli.libbasecoreui.R;

/**
 * 基础的底部对话框
 */
public class BaseBottomDialog extends Dialog {



    public BaseBottomDialog(@NonNull Context context) {
        super(context, R.style.StyleBaseDialog);
    }


    @Override
    public void show() {
        super.show();
        try{
            WindowManager.LayoutParams layoutParams = getWindow().getAttributes();
            layoutParams.width= WindowManager.LayoutParams.MATCH_PARENT;
            layoutParams.gravity = Gravity.BOTTOM;
            getWindow().setAttributes(layoutParams);
        }catch (Exception e){

        }
    }
}
